package notes.java.sjms23.s7_decorator;

// 具体装饰类 加糖
public class SugarMilkTeaDecoraor extends MilkTeaDecorator{

	private MilkTea milkTea;
	
	public SugarMilkTeaDecoraor(MilkTea milkTea) {
		this.milkTea = milkTea;
	}
	
	@Override
	public String desc() {
		return milkTea.desc() + "加糖";
	}
	
	@Override
	public double price() {
		System.out.println("另加2元");
		return milkTea.price() + 2;
	}
}
